<template>
  <div class="user">
    <!-- 面包屑 -->
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/main' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>信息管理</el-breadcrumb-item>
      <el-breadcrumb-item>个人信息</el-breadcrumb-item>
    </el-breadcrumb>
    <!-- 白板 -->
    <el-card >
      <el-row>
        <el-col :span="16">
          <el-row>
            <el-col :span="4" class="fontsytle">账号:</el-col>
            <el-col :span="10">{{user.userName}}</el-col>
          </el-row>
          <el-row>
            <el-col :span="4" class="fontsytle">昵称:</el-col>
            <el-col :span="10">{{user.nickName}}</el-col>
          </el-row>
          <el-row>
            <el-col :span="4" class="fontsytle">手机:</el-col>
            <el-col :span="10">{{user.phone}}</el-col>
          </el-row>
          <el-row>
            <el-col :span="4" class="fontsytle">邮箱:</el-col>
            <el-col :span="10">{{user.email}}</el-col>
          </el-row>
          <el-row>
            <el-col :span="4" class="fontsytle">地址:</el-col>
            <el-col :span="10">{{user.address}}</el-col>
          </el-row>
          <el-row>
            <el-col :span="4" class="fontsytle">注册时间:</el-col>
            <el-col :span="10">{{user.createTime}}</el-col>
          </el-row>
        </el-col>
        <el-col :span="8" >
          <el-image
            style="width: 200px; height: 200px"
            :src="user.iconUrl"
            fit="scale-down"></el-image>
        </el-col>
      </el-row>



    </el-card>
  </div>
</template>
<script>
export default {
  data() {
    return {
      user:{}
    };
  },
  methods: {
   async getUserInfo(id){
    var d=await this.$http("user/"+window.sessionStorage.getItem("token"))
      this.user=d.data
   }
  },
  mounted: function () {
    this.getUserInfo()
  },
};
</script>
<style scoped>
.user{
  font-size: 1.2em;
}
.fontsytle{
  font-weight: 600;
}
.el-row{
  margin: 10px 0;
}
</style>